<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>表格</title>
</head>
<body>

       <div id="box"></div>
        <script>

          //var z = '<table>' + '<tr>' + '<td>1</td>' + '<td>1</td>' +'<td>1</td> '+ '<td>1</td> '+'</tr>'+'</table>';
          var z = '';
          z = z + ' <table border="1px" width="200px" >';
          var i = 0;
          while (i<8) {
              z = z + '<tr>';
              s = 0;
              while (s < 8) {
                  z = z + '<td></td>';
                  s++
              }
              z = z + '</tr>';
              i++;
          }

         // z = z + '<tr><td>1</td><td>1</td><td>1</td><td>1</td></tr>';
       //   z = z + '<tr><td>1</td><td>1</td><td>1</td><td>1</td></tr>';
        //  z = z + '<tr><td>1</td><td>1</td><td>1</td><td>1</td></tr>';
        //  z = z + '<tr><td>1</td><td>1</td><td>1</td><td>1</td></tr>';
          z = z + '</table>';
          var box = document.getElementById('box');
          box.innerHTML = z;
            console.log(z)



        </script>
</body>
</html>

'